import Cookies from "js-cookie"

const tokenKey = "hrsass-token"
const TimeKey = "hrsass-time"

export function getToken() {
  return localStorage.getItem(tokenKey)
}

export function setToken (data) {
  return localStorage.setItem(tokenKey, data)
}

export function removeToken () {
  return localStorage.removeItem(tokenKey)
}

// 获取时间戳

export function getTimeStamp () {
  return Cookies.get(TimeKey)
}
// 设置时间戳

export function setTimeStamp () {
  return Cookies.set( TimeKey , Date.now() )
}